<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>账户列表</title>
</head>
<body>
    <h1>账户列表</h1>
    <a href="/account/logout">注销登录</a>
    <a href="/account/add">添加账户</a>
    <table border="1">
        <thead>
            <tr>
                <th>ID</th>
                <th>卡号</th>
                <th>密码</th>
                <th>余额</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr th:each="account : ${accounts}">
                <td th:text="${account.id}"></td>
                <td th:text="${account.cardno}"></td>
                <td th:text="${account.password}"></td>
                <td th:text="${account.balance}"></td>
                <td th:text="${account.status}"></td>
                <td>
                    <a th:href="@{/account/edit/{id}(id=${account.id})}">编辑</a>
                    <a th:href="@{/account/delete/{id}(id=${account.id})}">删除</a>
                </td>
            </tr>
        </tbody>
    </table>
</body>
</html>    